﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.Core.Interface {
    public interface ITransformation {
        /// <summary>
        /// Transform the dictionary into the underlying transformation type
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        string Transform(Dictionary<string, object> param);
        /// <summary>
        /// Transform the dictionary into the underlying transformation type
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        string Transform(List<Dictionary<string, object>> list);
        /// <summary>
        /// Transform the specified data into a collection of TData type
        /// </summary>
        /// <typeparam name="TData"></typeparam>
        /// <param name="data"></param>
        /// <returns></returns>
        IEnumerable<TData> Transform<TData>(string data) where TData : class;
        /// <summary>
        /// Extract canonical structure from data 
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Type GetCanonicalType(string data);
    }
}
